A business may use a web service to communicate with other entities via a distributed environment, such as the Internet or World Wide Web. To ensure that such an interaction is accomplished successfully, one or more protocols must be in place for carrying messages to and from participants, and specific business applications must be in place at each participant's end. Such interactions are message driven. For example, a buyer sends a purchase order to a seller. The seller then checks its inventory to determine if it can provide the ordered items. If so, the seller sends an acknowledgement back to the buyer with a price. Finally, the buyer accepts or rejects the seller's offer (and/or possibly places another order). As evident in this example, each participant's business application reacts to the receipt of messages. Also illustrated in this example is that these types of web service transactions may take place over long periods of time. For example, the seller may receive the purchase order from the buyer and may take a few days to evaluate its inventory prior to sending an acknowledgement. Further, each participant may conduct activities at its end, such as tracking messages and updating the status of each activity.
Software code that enables such interactions should be very robust to be able to accommodate the various methods for sending and receiving messages. In addition, the code should be properly written so that if an error occurs, the software will be able to react to, compensate for and/or otherwise accommodate the error. One method of detecting an error prior to running the program (“run time”) is by generating one or more flowgraphs during compilation (at “compile time”). As should be known to those skilled in the art, a compiler converts the high-level code used by programmers into a machine-readable language that can be more quickly executed at run time. At compile time, a compiler maps out the different possible logic paths that may be taken by the program to create a flowgraph of such logic paths. The flowgraphs are used to determine whether the program will cause an illegal operation in one or more of the logic paths and, if so, the compiler generates an error message. The error message is preferably a specific description of the type of error encountered, as well as the position within the code where the error occurred. Such specificity is useful because it enables quicker and more precise debugging. If an error is not detected at compile time, the error may be encountered at run time and could therefore affect a real-world transaction. In some situations, errors at run time may occur silently, where the error does not cause a program failure but instead corrupts data. In other situations, the errors at run time may cause a program to fail (or “crash”), to malfunction or otherwise become inoperative.
Implementing business transactions, such as those described above, with software code causes unique situations to take place when running and/or compiling the code. In the example described above where the seller may take a few days to evaluate its inventory prior to sending an acknowledgement, the software must be able to account for a sent message that does not receive a response for a potentially long time. Such accounting may need to be performed for a large number of messages that are being sent to and received from numerous third parties, each of which may have different message protocols. Thus, it is particularly important to have robust, error-free software code to control such business transactions.
Unfortunately, a shortcoming of conventional compilers is that such compilers cannot recognize the problems that may occur as a result of programming for sending and receiving messages as described above. The sending and receiving of messages necessitates a variety of unique branching and variable assignment situations. Errors in such situations are either not recognizable to conventional compilers, or are recognizable as an error but the compiler is unable to precisely determine the type of error and therefore cannot provide a complete error message to the programmer. Thus, the programmer either does not know about the error, or knows about the error but does not know the location or type of error. As a result, programming effective and robust software code to implement business transactions becomes a more time and money-consuming process than would otherwise be necessary.
Accordingly, what is needed is a method and system for detecting the assignment states of variables in software code that is processing transactions. More particularly, what is needed is a method for writing a command into a program, such as an XLANG/s program, that indicates to a compiler that the compiler either should or should not assume a process to have successfully occurred. Even more particularly, what is needed is a method of recognizing the command, for performing a flow analysis of the program and, if applicable, outputting an appropriate error message.